Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dfp: allowing the dfp cluster to do dns lookups #38237

Merged
merged 5 commits into from
Feb 4, 2025

Conversation

alyssawilk
Copy link
Contributor

@alyssawilk alyssawilk commented Jan 28, 2025

This allows bypassing the DFP for most DFP use. It does not yet support the use case use_subcluster_config at which point DFP is still required.

Risk Level: meidum
Testing: MORE NEEDED
Docs Changes: n/a
Release Notes: inline
[Optional Runtime guard:] envoy.reloadable_features.dfp_cluster_resolves_hosts

Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #38237 was opened by alyssawilk.

see: more, trace.

Copy link

CC @envoyproxy/runtime-guard-changes: FYI only for changes made to (source/common/runtime/runtime_features.cc).

🐱

Caused by: #38237 was opened by alyssawilk.

see: more, trace.

@alyssawilk alyssawilk force-pushed the async-dns branch 3 times, most recently from 3e66464 to ce1d3c8 Compare January 29, 2025 18:05
@alyssawilk
Copy link
Contributor Author

Coverage failure is real. I think I addressed one issue in the latest push but I want to add an e2e test of request cancelation during DFP lookup. I think the code is ready for a pass regardless if you're game

Signed-off-by: Alyssa Wilk <[email protected]>
@envoyproxy envoyproxy deleted a comment from repokitteh-read-only bot Feb 3, 2025
Signed-off-by: Alyssa Wilk <[email protected]>
Signed-off-by: Alyssa Wilk <[email protected]>
Copy link
Contributor

@RyanTheOptimist RyanTheOptimist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modulo a couple of minor comments, I think this LGTM. Very exciting!

HostConstSharedPtr host;
std::string details;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a comment on what details represents.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

*/
virtual void onAsyncHostSelection(HostConstSharedPtr&& host) PURE;
virtual void onAsyncHostSelection(HostConstSharedPtr&& host, std::string details) PURE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this perhaps be std::string&& to avoid a copy?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

// LoadDnsCacheEntryHandlePtr ensures that no callback will occur, at which
// point it is safe to delete the DFPHostSelectionHandle.
struct DFPHostSelectionHandle
: public Upstream::AsyncHostSelectionHandle,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: AsyncHostSelectionHandle is a class, so anything which extends it should also be a class I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Signed-off-by: Alyssa Wilk <[email protected]>
@alyssawilk alyssawilk merged commit d21b7ed into envoyproxy:main Feb 4, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants